package com.xyht.medicine_management_system.modules.order.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xyht.medicine_management_system.modules.consumptionPoint.entity.MmsConsumptionPointRecord;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author XYHT
 * @since 2023-12-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("mms_order")
@ApiModel(value = "MmsOrder对象", description = "订单表")
public class MmsOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "订单ID")
    private String id;

    @ApiModelProperty(value = "用户ID")
    private String userId;

    @ApiModelProperty(value = "药品信息")
    private String medicineInfo;

    @ApiModelProperty(value = "订单状态(0.订单取消 1.待支付 2.待发货 3.待收货 4.已收货)")
    private Integer orderStatus;

    @ApiModelProperty(value = "是否有售后")
    private Boolean isRefund;

    @ApiModelProperty(value = "是否售后中")
    private Boolean isRefunding;

    @ApiModelProperty(value = "订单是否结束")
    private Boolean isClose;

    @ApiModelProperty(value = "订单是否异常")
    private Boolean isAbnormal;

    @ApiModelProperty(value = "分账完结时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date profitSharingTime;

    @ApiModelProperty(value = "配送地址信息")
    private String addressInfo;

    @ApiModelProperty(value = "订单总金额，包括商品价格、运费等")
    private BigDecimal totalAmount;

    @ApiModelProperty(value = "优惠信息")
    private String couponInfo;

    @ApiModelProperty(value = "预支付ID")
    private String prepayId;

    @ApiModelProperty(value = "支付订单号")
    private String paymentTransactionId;

    @ApiModelProperty(value = "支付金额")
    private BigDecimal paymentAmount;

    @ApiModelProperty(value = "支付方式")
    private String paymentMethod;

    @ApiModelProperty(value = "支付时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date paymentTime;

    @ApiModelProperty(value = "订单备注信息")
    private String notes;

    @ApiModelProperty(value = "订单结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;

    @ApiModelProperty(value = "退款记录id集合")
    private String refundIdList;

    @ApiModelProperty(value = "是否使用积分(默认不使用)")
    private Boolean isUsePoint;

    @ApiModelProperty(value = "消费积分记录id")
    private String pointRecordId;

    @ApiModelProperty(value = "订单类型(0.普通订单)")
    private Integer type;

    @ApiModelProperty(value = "订单级别(0.普通订单)")
    private Integer orderLevel;

    @ApiModelProperty(value = "发票信息")
    private String invoiceInfo;

    @ApiModelProperty(value = "快递公司信息")
    private String carrierInfo;

    @ApiModelProperty(value = "版本号")
    @Version
    private Integer version;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @ApiModelProperty(value = "是否删除：0：未删除 1：已删除")
    @TableLogic
    private Integer isDeleted;


}
